package com.dmbjz.common.exception;

import com.dmbjz.common.constant.ApiConstant;
import lombok.Getter;
import lombok.Setter;

/*全局异常处理*/
@Getter
@Setter
public class ParameterException extends RuntimeException{

    private Integer errorCode;

    public ParameterException(){
        super (ApiConstant.ERROR_MESSAGE);
        this. errorCode = ApiConstant.ERROR_CODE;
    }

    public ParameterException(Integer errorCode){ this.errorCode = errorCode;}

    public ParameterException(String message){
        super(message);
        this.errorCode = ApiConstant.ERROR_CODE;
    }

    public ParameterException(Integer errorCode, String message){
        super(message);
        this.errorCode = errorCode;
    }

}
